<?php echo $html->docType('xhtml-trans'); ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<title><?php echo $mainTitle ?> - <?php echo $title_for_layout; ?></title>
		<?php echo $html->charset('UTF-8') ?>
		<?php echo $pageHeader; ?>
		<link rel="icon" href="<?php echo $this->webroot.$this->themePath.'favicon.ico'; ?>" type="image/x-icon" />
		<link rel="shortcut icon" href="<?php echo $this->webroot.$this->themePath.'favicon.ico' ?>" type="image/x-icon" />
		<?php echo $html->css('esion'); ?>
		<?php echo $html->css('page'); ?>
		<?php echo $html->css('form'); ?>
		
		<!--[if lt IE 7.]>
			<?php echo $html->css('ie'); ?>
			<script defer type="text/javascript" src="/js/fix/pngfix.js"></script>
		<![endif]-->
		
		<?php if(isset($javascript)): ?>
			<?php echo $javascript->link('scriptaculous/prototype'); ?>
			<?php echo $javascript->link('tiny_mce/tiny_mce'); ?>
			<?php echo $javascript->link('scriptaculous/scriptaculous.js?load=effects,dragdrop'); ?>
			<?php echo $javascript->link('scriptaculous/controls'); ?>
		<?php endif; ?>
	</head>
	<body>
		<div id="container">
			<div id="header">
				<h1><?php echo $html->link($mainTitle, '/'); ?></h1>
				<h2><?php echo $subTitle; ?></h2>
			</div>
			
				<div id="content">
					
					<?php if($session->check('Message.flash'))
						{
							$session->flash();
						} ?>
	
					<?php echo $content_for_layout;	?>
				</div>
				
				<hr class="content" />
				
				<div id="footer">
					<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
						<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" />
					</a>
				</div>
			
		</div>
		
		<div id="sidebar">
			<?php echo $this->renderElement('sidebar'); ?>
		</div>
	
		<?php if(isset($javascript)) : ?>
			<div id="ajax" style="display : none;">&nbsp;</div>
		<?php endif; ?>
		<?php echo $cakeDebug ?>
	</body>
</html>
